/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'
//
const mechanismRouter = {
  path: '/mechanism',
  component: Layout,
  redirect: 'noRedirect',
  hidden:false,
  name: '组织架构',
  meta: {
    title: '组织架构',
    icon: 'people',
    roles: ['mechanism']
  },
  children: [
    {
      path: 'workbrench',
      component: () => import('@/views/mechanism/workbrench/workbrench'),
      name: '总览',
      meta: { title: '总览' }
    },
    {
      path: 'company',
      component: () => import('@/views/mechanism/company/company'),
      name: '公司',
      meta: { title: '公司' }
    },
    {
      path: 'company-add',
      component: () => import('@/views/mechanism/company/company-add'),
      name: '新公司',
      hidden: true,
      meta: { title: '新公司' }
    },
    {
      path: 'company-detail',
      component: () => import('@/views/mechanism/company/company-detail'),
      name: '公司档案',
      hidden: true,
      meta: { title: '公司档案' }
    },
    {
      path: 'department',
      component: () => import('@/views/mechanism/department/department'),
      name: '部门',
      meta: { title: '部门' }
    },
    {
      path: 'department-add',
      component: () => import('@/views/mechanism/department/department-add'),
      name: '新部门',
      hidden: true,
      meta: { title: '新部门' }
    },
    {
      path: 'department-detail',
      component: () => import('@/views/mechanism/department/department-detail'),
      name: '新部门',
      hidden: true,
      meta: { title: '新部门' }
    },
    {
      path: 'position',
      component: () => import('@/views/mechanism/position/position'),
      name: '职位',
      meta: { title: '职位' }
    },
    {
      path: 'position-add',
      component: () => import('@/views/mechanism/position/position-add'),
      name: '新职位',
      hidden: true,
      meta: { title: '新职位' }
    },
    {
      path: 'employee',
      component: () => import('@/views/mechanism/index'),
      name: '应用',
      meta: { title: '应用' },
      children:[
        {
          path: 'employee',
          component: () => import('@/views/mechanism/employee/employee'),
          name: '员工',
          meta: { title: '员工' }
        },
        {
          path: 'employee-detail',
          component: () => import('@/views/mechanism/employee/employee-detail'),
          name: '新部门',
          hidden: true,
          meta: { title: '新部门' }
        },
        {
          path: 'employee-add',
          component: () => import('@/views/mechanism/employee/employee-add'),
          name: '新员工',
          hidden: true,
          meta: { title: '新员工' }
        },

      ]
    },
    {
      path: 'application',
      component: () => import('@/views/mechanism/index'),
      name: '应用',
      meta: { title: '应用' },
      children:[
        {
          path: 'product',
          component: () => import('@/views/mechanism/product/product'),
          name: '产品',
          meta: { title: '产品' }
        },
        {
          path: 'product-add',
          component: () => import('@/views/mechanism/product/product-add'),
          name: '新产品',
          hidden: true,
          meta: { title: '新产品' }
        },
        {
          path: 'order',
          component: () => import('@/views/mechanism/order/order'),
          name: '订单',
          meta: { title: '订单' }
        },
        {
          path: 'order-detail',
          component: () => import('@/views/mechanism/order/order-detail'),
          name: '新订单',
          hidden: true,
          meta: { title: '新订单' }
        },

      ]
    },
  ]
}

export default mechanismRouter
